package com.usian.cars.feign;

import com.usian.entity.Favorites;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("order")
public interface OrderFeign {

    @Operation(summary = "添加收藏")
    @PostMapping("/order/favorites/addFavorites")
    public boolean addFavorites(@RequestBody Favorites favorites);


    @Operation(summary = "取消收藏")
    @DeleteMapping("/order/favorites/deleteFavorites/{userId}/{carId}")
    public boolean deleteFavorites(@PathVariable Integer userId, @PathVariable Integer carId);
}
